﻿using System.Collections.Generic;

namespace Douyu.SDK.Messages
{
    /// <summary>
    /// 用户赠送酬勤通知消息
    /// </summary>
    public class BcBuyDeserveMessage : BaseMessage
    {
        public BcBuyDeserveMessage(BaseMessage msg) : base(msg)
        {
        }

        /// <summary>
        /// 房间ID
        /// </summary>
        public int rid
        {
            get { return GetValue(nameof(rid), 0); }
        }

        /// <summary>
        /// 分组号
        /// </summary>
        public int gid
        {
            get { return GetValue(nameof(gid), 0); }
        }

        /// <summary>
        /// 用户等级
        /// </summary>
        public int level
        {
            get { return GetValue(nameof(level), 0); }
        }

        /// <summary>
        /// 赠送数量
        /// </summary>
        public int cnt
        {
            get { return GetValue(nameof(level), 0); }
        }

        /// <summary>
        /// 连击数
        /// </summary>
        public int hits
        {
            get { return GetValue(nameof(hits), 1); }
        }

        /// <summary>
        /// 酬勤等级
        /// </summary>
        public int lev
        {
            get { return GetValue(nameof(lev), 0); }
        }

        /// <summary>
        /// 用户序列化信息
        /// </summary>
        public dyUserInfo sui
        {
            get
            {
                var dict = GetValue(nameof(sui), new Dictionary<string, object>());
                return new dyUserInfo(new SafeDictionary());
            }
        }

    }

}
